package Demo;

public class Demo46 {
    public static void main(String[] args) {
        System.out.println("start**********************");
        new Thread(
                () -> {
                    int temp = 0;
                    for (int i = 0; i < 1000; i++) {
                        temp += i;
                        System.out.println(temp);
                        if (temp >= 100) {
                            System.exit(0);
                        }
                    }
                }
        ).run();
        System.out.println("end*****************************");


    }
}

class mythread_46 implements Runnable {
    @Override
    public void run() {

    }
}
